package com.tigerhhzz.springcloud.config;


import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author tigerhhzz
 * @date 2023/4/13 9:24
 */
@Configuration
public class ApplicationContextConfig {

    @Bean
    //@LoadBalanced   //如果使用自己手写的负载均衡算法，就去掉@laodBalanced注解
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }

}
